<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('代付申请查询列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>流水号：</label>
                                <input type="text" name="sequenceNo"/>
                            </li>
                            <li>
                                <label>商户号：</label>
                                <select name="merchCd" th:with="type=${@dict.getType('merch_cd')}">
                                    <option value="">所有</option>
                                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                </select>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="pay:result:add">
                    <i class="fa fa-plus"></i> 代付申请查询
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="pay:result:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('pay:result:edit')}]];
        var removeFlag = [[${@permission.hasPermi('pay:result:remove')}]];
        var merchCdDatas = [[${@dict.getType('merch_cd')}]];
        var modeDatas = [[${@dict.getType('pay_mode')}]];
        var prefix = ctx + "pay/result";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "代付申请查询",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'sequenceNo',
                    title: '流水号',
                    visible: false
                },
                {
                    field: 'merchCd',
                    title: '商户号',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(merchCdDatas, value);
                    }
                },
                {
                    field: 'applyNo',
                    title: '限额申请流水号'
                },
                {
                    field: 'applyDate',
                    title: '申请日期'
                },
                {
                    field: 'applyTime',
                    title: '申请时间'
                },
                {
                    field: 'status',
                    title: '状态'
                },
                {
                    field: 'msg',
                    title: '响应消息'
                },
                {
                    field: 'amt',
                    title: '申请代付金额'
                },
                {
                    field: 'mode',
                    title: '代付模式',
                    formatter: function(value, row, index) {
                       return $.table.selectDictLabel(modeDatas, value);
                    }
                },
                {
                    field: 'fileId',
                    title: '代付文件编号'
                },
                {
                    field: 'fileName',
                    title: '代付文件'
                },
                {
                    field: 'cnt',
                    title: '代付笔数'
                },
                {
                    field: 'addInfo',
                    title: '附加信息'
                },
                {
                    field: 'extRef',
                    title: '核心流水号'
                },
                {
                    field: 'extStat',
                    title: '核心返回状态'
                },
                {
                    field: 'extInfo',
                    title: '核心返回信息'
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>